-- GENERATED SPELL FOR [Twilight Adherent] --


function spell0_33818(pUnit, Event) --@Arcane Burst,Self--
pUnit:FullCastSpellOnTarget(64663,pUnit)
pUnit:RegisterEvent('Sorts_33818', 10273, 1)
end

function spell1_33818(pUnit, Event) --@Blink,n/a--
pUnit:FullCastSpellOnTarget(64662,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33818', 1000, 1)
end

function spell2_33818(pUnit, Event) --@Greater Heal,Heal--
pUnit:FullCastSpellOnTarget(63760,pUnit)
pUnit:RegisterEvent('Sorts_33818', 2000, 1)
end

function spell3_33818(pUnit, Event) --@Psychic Scream,Self--
pUnit:FullCastSpellOnTarget(13704,pUnit)
pUnit:RegisterEvent('Sorts_33818', 6311, 1)
end

function spell4_33818(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(37978,pUnit)
pUnit:RegisterEvent('Sorts_33818', 15000, 1)
end

function Sorts_33818(pUnit, Event)
local choix_sorts_33818 = math.random(0, 4)
if choix_sorts_33818 == 0 then
pUnit:RegisterEvent('spell0_33818', 1, 1)
end
if choix_sorts_33818 == 1 then
pUnit:RegisterEvent('spell1_33818', 1, 1)
end
if choix_sorts_33818 == 2 then
pUnit:RegisterEvent('spell2_33818', 1, 1)
end
if choix_sorts_33818 == 3 then
pUnit:RegisterEvent('spell3_33818', 1, 1)
end
if choix_sorts_33818 == 4 then
pUnit:RegisterEvent('spell4_33818', 1, 1)
end
end

function mob33818_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_33818', math.random(1500, 3000), 1)
end

function mob33818_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33818_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33818_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(33818, 1, 'mob33818_Action')
RegisterUnitEvent(33818, 2, 'mob33818_Leave')
RegisterUnitEvent(33818, 3, 'mob33818_Kill')
RegisterUnitEvent(33818, 4, 'mob33818_Die')
